package uicgas.globaldevice;

import uicgas.globaldata.CreditCard;
import uicgas.tools.Assert;

public class MockCardReader implements CardReader
{
	private SwipeCardNotifiable cardNotifiable = null;

	public MockCardReader(SwipeCardNotifiable cardNotifiable)
	{
		Assert.notNull(cardNotifiable);
		this.cardNotifiable = cardNotifiable;
	}

	@Override
	public CreditCard getCardData()
	{
		return new CreditCard("Someone", "1234567890123456",
				"851 S. Morgan Street, Chicago, IL 60607");
	}
	
	/**
	 * Generic Constructor for mock Card Reader
	 * @author Steve
	 */
	public MockCardReader()
	{
		//do nothing for now
	}

	@Override
	public void notifyCardSwipe()
	{
		cardNotifiable.swipeCard(this);
	}

}
